home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / hardware / gm1507 / gmtest.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-10-27  |  1.3 KB  |  65 lines

  1. { --------------------------------------------------------------------------- }
  2. { GMTEST.PAS  Sample program demonstrating usage of gMouse unit.              }
  3. {                                                                             }
  4. { Copyright(c) 1994 by B-coolWare.  Written by Bobby Z.                       }
  5. { --------------------------------------------------------------------------- }
  6.  
  7. uses g_Mouse, Crt;
  8.  
  9. function stUpcase( S : String ) : String; assembler;
  10. asm
  11.     les    di,@Result
  12.     push    ds
  13.     lds    si,S
  14.     cld
  15.     lodsb
  16.     mov    cl,al
  17.     sub    ch,ch
  18.     stosb
  19.     jcxz    @@Q
  20. @@1:
  21.     lodsb
  22.     cmp    al,'a'
  23.     jb    @@2
  24.     cmp    al,'z'
  25.     ja    @@2
  26.     and    al,0DFh
  27.     stosb
  28. @@2:
  29.     loop    @@1
  30. @@Q:
  31.     pop    ds
  32. end;
  33.  
  34. {$I SHAPES.INC}
  35.  
  36. const
  37.     doFlip : Boolean = True;
  38.  
  39. var
  40.     SaveANDMask,
  41.     SaveORMask  : array[0..15] of Byte;
  42.  
  43. begin
  44.  WriteLn('g_Mouse Test  Version 1.50.7  Copyright(c) 1993,94 by B-coolWare.');
  45.  WriteLn;
  46.  WriteLn('Move mouse around and enjoy the pointer. Press a key to exit...');
  47.  if ParamCount > 0 then
  48.   if stUpcase(ParamStr(1)) = 'NOFLIP' then
  49.    doFlip := False;
  50.  InitGMouse(doFlip);
  51.  GetPointerShape(SaveANDMask, SaveORMask);
  52.  SetPointerShape(SandClockANDMask, SandClockORMask);
  53.  asm
  54.     mov  ax,1
  55.     int  33h
  56.  end;
  57.  repeat
  58.  until KeyPressed;
  59.  ReadKey;
  60.  SetPointerShape(SaveANDMask, SaveORMask);
  61.  repeat
  62.  until KeyPressed;
  63.  ReadKey; 
  64. end.
  65.